package main

import (
	"context"
	"fmt"
	clientv3 "go.etcd.io/etcd/client/v3"
)

func main() {
	leases, err := CLI.Leases(context.Background())
	if err != nil {
		panic(err)
	}

	for _, l := range leases.Leases {
		fmt.Println(l)
	}

	lease := clientv3.NewLease(CLI)
	resp, err := lease.Grant(context.Background(), 30)
	if err != nil {
		panic(err)
	}
	fmt.Println(lease)
	fmt.Println(resp)

}
